<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of LogPostDAO
 *
 * @author Albuquerque
 */
require_once "FactoryConnection.php";
class LogPostDAO {
    //put your code here

    var $conect;
	
    function __construct(){
	$this->conect = FactoryConnection::getConexao();
    }
    public function salvar($logPost){
         $query = "INSERT INTO
                ceape_log_post( valor)
                VALUES(
                        '".$logPost->getValor()."'
                )";

        try{
            $this->conect->beginTransaction();
            $sucesso = $this->conect->exec($query);
            $this->conect->commit();
            } catch (PDOException $ex){
            $this->conect->rollBack();
        }

        return $sucesso;
    }

}
?>